USB is a serial-bus standard for connecting a host such as a computer and a function of a peripheral device or the like. USB specifications are not only mechanical and electrical specifications. Protocols conforming to various transfer-mode procedures and types of devices also have been defined by the USB Implementor's Forum, which is a USB standardization group. The defined protocols include a protocol of a USB printer class for connecting a host and a printer by a USB. USB printer class has already been installed, or is capable of being installed, as a USB printer-class driver in, e.g., Windows, which is the Microsoft operating system, the LINUX operating system, and the Macintosh operating system of Apple Computer. Since data is sent and received as packets in the case of USB, multichannel operation can be achieved. With a printer-class driver, bi-directional communication of data is implemented using two channels, for example, Endpoint 1 and Endpoint 2, among the logical channels (endpoints) provided by USB. Commands defined by USB Printer Class are sent and received by Endpoint 0.
There is no concept of a session in the specifications of USB Printer Class. When communication of data is aborted in mid-course, therefore, there is no way that the receiving side can ascertain such aborting of communication except by checking the content of received data or by detecting timeout.
However, there may also be cases where even if abort has been detected on the receiving side by timeout, there is actually nothing more than a delay in data transmission on the transmitting side and data transmission has in fact not been aborted. More specifically, there are instances where a printer runs out of paper, for example, as a result of which the transmitting side can no longer transmit data and the receiving side detects timeout. There are also cases where the receiving side cannot judge merely from the content of data that aborting of data transmission has occurred.
Thus, there is the danger that a situation may arise in which the processing that should be executed is not because operation on the transmitting side and a judgement made on the receiving side do not agree and, hence, data-transmission abort processing that should not be executed is executed on the receiving side or data-transmission abort processing that should be executed is not executed on the receiving side. For example, consider a case where the transmitting side is a host computer and the receiving side a printer. In such case the printer should respond to suspension of data transmission by discarding data received thus far but not yet printed and construing that data received thenceforth is data constituting a new print job. However, if the printer cannot detect that data transmission has been aborted, then it will execute processing that assumes that the data of the aborted print job and the data of the ensuing new print job is data contained in a single print job. The result is that the wrong content will be printed. Conversely, if the printer misjudges that data transmission has been canceled, then it will abort print processing that should not be abort.